package org.ym.file.domain.model.node;

import lombok.*;
import org.ym.database.hibernate.base.BaseModel;
import org.ym.file.domain.model.node.embed.FileSystemWorkFolder;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author ym
 */
@Entity
@Table(name = "f_system_node")
@Getter(AccessLevel.PROTECTED)
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@Builder
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileSystemNode extends BaseModel {

    private static final long serialVersionUID = 4995251356306814090L;

    /**
     * 文件系统名称
     */
    @Column(name = "name",nullable = false,length = 100)
    private String name;
    /**
     * 排序号
     */
    @Column(name = "sort_no")
    private Integer sortNo;
    /**
     * 节点工作目录
     */
    @Embedded
    private FileSystemWorkFolder fileSystemWorkFolder;
    /**
     * 备注
     */
    @Column(name = "memo",length = 300)
    private String memo;
}
